package com.nq.stock.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nq.common.ServerResponse;
import com.nq.common.entity.StStockTickerDetails;
import com.nq.common.entity.StStockTickerKLineList;
import com.nq.common.entity.StockTickerList;
import com.nq.common.entity.info.StockTickerListInfo;
import com.nq.common.entity.vo.StStockOnlyMarketAndCode;
import com.nq.common.entity.vo.StStockTickerDetailsVo;
import com.nq.stock.entity.StStockKLine;
import com.nq.stock.entity.StStockTicker;
import com.nq.stock.vo.StStockTickerKLineVO;

import java.util.List;

/**
 * @Description: st_stock_ticker
 * @Author: jeecg-boot
 * @Date:   2024-05-30
 * @Version: V1.0
 */
public interface IStStockTickerService extends IService<StStockTicker> {

    int addStockTicker(List<StockTickerList> stockTickerList);

    /**
     * 查询股票详情
     * @param market
     * @param code
     * @return
     */
    StStockTickerDetailsVo queryDetails(String market, String code);

    /**
     * 查询K线详情
     * @param market
     * @param code
     * @param interval
     * @param page
     * @return
     */
    StStockTickerKLineVO queryKLineDetails(String market, String code, String interval, String page);

    int addStockKLine(StStockKLine kLine);

    StStockKLine queryKLineByMarketAndCode(String market, String code);

    int updateStockKLineById(StStockKLine kLine);

    List<StStockKLine> queryKLineByMarket(String market);

    StStockTickerDetailsVo assembleTheStockDetailData(String market, String code);

    List<StStockOnlyMarketAndCode> selectOnlyMarketAndCode();


    int deleteByMarketAndCode(String market, String code);
}
